import java.util.Scanner;

public class Try {
    /**
     * 复习方法的使用
     * 简单方法
     * 方法的重载
     */

    //自定义一个方法1
    public static void pub(){
        System.out.println("Welcome to WGD");
    }
    //自定义一个方法2
    public static int pub2(int a,int b){
        return a + b;
    }

    //定义方法3
    public static int pub3(int a,int b){
        return a + b;
    }

    //再次定义方法3
    public static double pub3(double a, double b){
        return a - b;
    }

    public static void main(String[] args) {
        /*System.out.println("111");*/

        //调用方法1
        pub();

        //调用方法2
        int a = 1;
        int b = 2;

        //使用Scanner来new一个从键盘输入的变量从而达到赋值效果
        /*Scanner sc = new Scanner(System.in);
        a = sc.nextInt();
        b = sc.nextInt();

        System.out.println(pub2(a,b));*/

        //调用方法3
        int ret1 = 0;
        double ret2 = 0;

        ret1 = pub3(10,20);
        ret2 = pub3(10.0,20.0);

        System.out.println(ret1);
        System.out.println(ret2);
    }
}
